let dialog = require('electron').remote.dialog;
const win = remote.getCurrentWindow();


let chromeFile = async function (callback) {
    var value = await dialog.showOpenDialog(win, {
        title: '选择文件',
        filters: [],
        properties: ['openFile'],
    });
    if (!value.canceled) {
        var file = value.filePaths[0];
        callback(file);
    };
};

module.exports = {
    chromeFile: chromeFile,
}
